import {GET_LOGIN, ILoginAction} from "../actions/login";

interface ILogin {
  readonly login: boolean
}

const initialLogin: ILogin = {
  login: false
}

const login = (state: ILogin = initialLogin, action: ILoginAction): ILogin => {
  if (action.type === GET_LOGIN) {
    return {...state, login: true}
  }
  return state
}

export default login;
